package com.xqls.dal.dao.mybatis;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.xqls.dal.dao.DrainFlowRecordDao;
import com.xqls.dal.model.DrainFlowRecord;
import com.xqls.dal.service.DrainFlowRecordMapper;
@Repository
public class DrainFlowRecordDaoImpl implements DrainFlowRecordDao {
	
	@Autowired
	private DrainFlowRecordMapper flowMapper;
	

	@Override
	public int insert(DrainFlowRecord record) {
		return flowMapper.insert(record);
	}

	@Override
	public List<Map<String, Object>> selectMinByMap(Map<String, Object> map) {
		return flowMapper.selectMinByMap(map);
	}


	@Override
	public List<Map<String, Object>> selectHourByMap(Map<String, Object> map) {
		return flowMapper.selectHourByMap(map);
	}


	@Override
	public List<Map<String, Object>> selectDayByMap(Map<String, Object> map) {
		return flowMapper.selectDayByMap(map);
	}


	@Override
	public List<Map<String, Object>> selectMonthByMap(Map<String, Object> map) {
		return flowMapper.selectMonthByMap(map);
	}


	@Override
	public List<Map<String, Object>> selectYearByMap(Map<String, Object> map) {
		return flowMapper.selectYearByMap(map);
	}


	@Override
	public Map<String, Object> selDayCumulativeFlow(Map<String, Object> map) {
		return flowMapper.selDayCumulativeFlow(map);
	}


	@Override
	public int insertToMonth(Map<String, Object> map) {
		flowMapper.deleteMonth(map);
		int result = flowMapper.insertToMonth(map);
		return result;
	}

	@Override
	public int insertToDay(Map<String, Object> map) {
		flowMapper.deleteDay(map);
		int result = flowMapper.insertToDay(map);
		return result;
	}

	@Override
	public Map<String, Object> selectYearColumn(Map<String, Object> map) {
		return flowMapper.selectYearColumn(map);
	}

	@Override
	public Map<String, Object> selectMapFromFlow(Map<String, Object> map) {
		return flowMapper.selectDayMax(map);
	}

	@Override
	public Map<String, Object> selectMapFromDayFlow(Map<String, Object> map) {
		return flowMapper.selectMonthMax(map);
	}

	@Override
	public Map<String, Object> selectMaxBeforeThisByMap(Map<String, Object> map) {
		return flowMapper.selectMaxBeforeThisByMap(map);
	}

	
	@Override
	public List<Map<String, Object>> getMinuteListByMap(Map<String, Object> map) {
		return this.flowMapper.getMinuteListByMap(map);
	}

	@Override
	public List<Map<String, Object>> getHourListByMap(Map<String, Object> map) {
		return this.flowMapper.getHourListByMap(map);
	}

	@Override
	public List<Map<String, Object>> getDayListByMap(Map<String, Object> map) {
		return this.flowMapper.getDayListByMap(map);
	}

	@Override
	public List<Map<String, Object>> getMonthListByMap(Map<String, Object> map) {
		return this.flowMapper.getMonthListByMap(map);
	}

	@Override
	public List<Map<String, Object>> getYearListByMap(Map<String, Object> map) {
		return this.flowMapper.getYearListByMap(map);
	}

}
